#!/bin/bash

# 运算数与运算符之间有空格
val=`expr 2 + 2`
echo "2+2= $val"

a=10
b=20

val1=`expr $a + $b`
echo "a + b = $val1"
val2=`expr $a - $b`
echo "a - b = $val2"
val3=`expr $a \* $b`
echo "a * b = $val3"
val4=`expr $a / $b`
echo "a / b = $val4"
val5=`expr $a % $b`
echo "a % b = $val5"
val6=`expr $a == $b`
echo "a == b : $val6"
val7=`expr $a != $b`
echo "a != b : $val7"
